package PTA2.ti47;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char endChar = scanner.next().charAt(0);
        scanner.close();

        if (endChar < 'A' || endChar > 'Z') {
            System.out.println("输入必须是大写字母");
            return;
        }

        int totalLevels = endChar - 'A' + 1;
        for (int level = 1; level <= totalLevels; level++) {
            for (int i = 1; i <= 39 - (level - 1); i++) {
                System.out.print(" ");
            }

            char currentChar = (char)('A' + level - 1);
            if (level == 1) {
                System.out.println(currentChar);
                continue;
            }

            if (level == totalLevels) {
                for (int i = 1; i <= 2 * level - 1; i++) {
                    System.out.print(currentChar);
                }
                System.out.println();
                continue;
            }

            System.out.print(currentChar);
            for (int i = 1; i <= 2 * (level - 1) - 1; i++) {
                System.out.print(" ");
            }
            System.out.println(currentChar);
        }
    }
}
